/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View;
import Model.Contact;
import Model.ContactList;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

/**
 *
 * @author asus
 */
public class Form extends JFrame implements ActionListener  {
    
    ArrayList NewContact= new ArrayList();
    
    String NAME,LAST_NAME,HOME_ADD,COMPANY_ADD,PHONE_PERSO,PHONE_PRO,HOME_PAGE,EMAIL,PHOTO;
    private JPanel container = new JPanel();
    
    Container content;
    
    
    JTextField text1=new JTextField();
    JTextField text2=new JTextField();
    JTextField text3=new JTextField();
    JTextField text4=new JTextField();
    JTextField text5=new JTextField();
    JTextField text6=new JTextField();
    JTextField text7=new JTextField();
    JTextField text8=new JTextField();
    JTextField text9=new JTextField();
    ContactList ContactL;
    
    /**
     * Constructor
     * @param NAME
     * @param LAST_NAME
     * @param HOME_ADD
     * @param COMPANY_ADD
     * @param PHONE_PERSO
     * @param PHONE_PRO
     * @param HOME_PAGE
     * @param EMAIL
     * @param PHOTO
     */
/*   public Form(String NAME,String LAST_NAME,String HOME_ADD,String COMPANY_ADD,String PHONE_PERSO,String PHONE_PRO,String HOME_PAGE,String EMAIL,String PHOTO){
   
            this.NAME = NAME;
            this.LAST_NAME = LAST_NAME;
            this.HOME_ADD= HOME_ADD;
            this.COMPANY_ADD = COMPANY_ADD;
            this.PHONE_PERSO= PHONE_PERSO;
            this.PHONE_PRO = PHONE_PRO;
            this.HOME_PAGE = HOME_PAGE;
            this.EMAIL = EMAIL;
            this.PHOTO=PHOTO;
      }*/

    public Form (ContactList ContactL){
    
    this.ContactL=ContactL;
    this.setTitle("Form");
    this.setSize(300, 400);
    this.setResizable(false);
   // this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setLocationRelativeTo(null);
    
    this.content=getContentPane();
   
    JPanel bVert = new JPanel();
  // Box bVert=Box.createVerticalBox();
    
    
    
    content.add(bVert);
    
    JLabel label1=new JLabel("Name");
    bVert.add(label1);
    bVert.add(text1);
    
    JLabel label2=new JLabel("Last Name");
    bVert.add(label2);
    bVert.add(text2);
    
    JLabel label3=new JLabel("Home Address");
    bVert.add(label3);
    bVert.add(text3);
    
    JLabel label4=new JLabel("Company address");
    bVert.add(label4);
    bVert.add(text4);
    
    JLabel label5=new JLabel("Phone perso");
    bVert.add(label5);
    bVert.add(text5);
    
    JLabel label6=new JLabel("Phone pro");
    bVert.add(label6);
    bVert.add(text6);
    
    JLabel label7=new JLabel("Home Page");
    bVert.add(label7);
    bVert.add(text7);
    
    JLabel label8=new JLabel("Email");
    bVert.add(label8);
    bVert.add(text8);
    
     JLabel label9=new JLabel("Photo");
    bVert.add(label9);
    bVert.add(text9);
    
    JButton valid=new JButton("Add new Contact");
    bVert.add(valid);
    valid.addActionListener(this);
    
   // this.setContentPane(content);
    this.setVisible(true);
    }
    
    
          
    
    /*
     * 
     */
        @Override
        public void actionPerformed(ActionEvent e) {
        
        }
        
        
        
}